<script id="content" type="text/template">
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-state'()}-->" class="btn btn-default <!--if{http().anchor.query.state}--><!--else-->active<!--/if-->">全部状态</a>
		<a href="<!--helper {'anchor-query-state'('2')}-->" class="btn btn-default <!--if{http().anchor.query.state == '2'}-->active<!--/if-->">等待审核中</a>
		<a href="<!--helper {'anchor-query-state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.state == '1'}-->active<!--/if-->">已通过审核</a>
		<a href="<!--helper {'anchor-query-state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.state == '0'}-->active<!--/if-->">审核未通过</a>
	</div>
	
	<button class="btn btn-default" type="button" action-button="state_succeed"><span class="glyphicon glyphicon-ok-sign"></span> 通过</button>
	<button class="btn btn-default" type="button" action-button="state_defeated"><span class="glyphicon glyphicon-minus-sign"></span> 失败</button>
	<button class="btn btn-default search" type="button" ><span class="glyphicon glyphicon-filter"></span> 筛选</button>
	<!--if{http().anchor.query.search}--><span class="label label-default">存在筛选</span><!--/if-->
	
	<hr/>
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>评论内容</th>
          <th>
          	<!--if{http().anchor.query.sort == "module_desc"}-->
          	<a href="javascript:;" action-sort="module_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>模块</a>
          	<!--elseif{http().anchor.query.sort == "module_asc"}-->
          	<a href="javascript:;" action-sort="module_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>模块</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="module_desc">模块</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">状态</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "user_nickname_desc"}-->
          	<a href="javascript:;" action-sort="user_nickname_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>用户信息</a>
          	<!--elseif{http().anchor.query.sort == "user_nickname_asc"}-->
          	<a href="javascript:;" action-sort="user_nickname_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>用户信息</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="user_nickname_desc">用户信息</a>
          	<!--/if-->
          </th>
          <th>顶级与回复</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
          <th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].user_comment_id}-->"></th>
          <td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
          <td>
          	<div class="tips" data-title="查看评论内容" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 350px;cursor: pointer;display: inline-block;" data="<!--{response.list.data[i].user_comment_value}-->"><!--{response.list.data[i].user_comment_value}--></div>
          </td>
          
          <td>
          <!--if{response.list.data[i].user_comment_module}-->	
          <!--helper{'module-name'(response.list.data[i].user_comment_module)}-->
          <div style="color: #999;"><span class="glyphicon glyphicon-tag"></span><!--{response.list.data[i].user_comment_module}--></div>
          <!--else-->
          -
          <!--/if-->
          </td>
          
          <td>
			<!--if{parseInt(response.list.data[i].user_comment_state) == 0}-->
			<span class="label label-danger">审核未通过</span>
			<!--elseif{parseInt(response.list.data[i].user_comment_state) == 1}-->
			<span class="label label-success">已通过审核</span>
			<!--elseif{parseInt(response.list.data[i].user_comment_state) == 2}-->
			<span class="label label-warning">等待审核中</span>
			<!--else-->
			<span class="label label-default">未知</span>
			<!--/if-->
		  </td>
          <td><!--{WangAho().date("yyyy/MM/dd HH:mm EE", parseInt(response.list.data[i].user_comment_update_time) * 1000)}--></td>
          <td style="max-width: 200px;">
          	<div style="max-width: 200px;display: inline-block;">
	          <!--if{response.list.data[i].user_logo_image_id}-->
	          <img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_logo_image_id+'?imageView2/1/w/30'}-->" class="img-circle">
	          <!--/if-->
	          <!--if{response.list.data[i].user_nickname}-->
	          <!--{response.list.data[i].user_nickname}-->
	          <!--else-->
	          <span style="color: #999999;">未设置昵称</span>
	          <!--/if-->
	          <!--if{response.list.data[i].user_phone_verify_list}-->
	          	(<span style="word-wrap:break-word;"><!--{response.list.data[i].user_phone_verify_list}--></span>)
	          <!--else-->
	          <span style="color: #999999;">无认证手机</span>
	          <!--/if-->
          </div>
          </td>
          
          <td>
          	<!--if{response.list.data[i].user_comment_root_id}-->
          	<span class="label label-default tips" style="cursor: pointer;" data-title="查看顶级内容"  data="<!--{response.list.data[i].user_comment_root_value}-->">顶级</span>
          	<!--else-->
          	<span style="color: #999;">无顶级</span>
          	<!--/if-->
          	
          	<!--if{response.list.data[i].user_comment_parent_id}-->
          	<span class="label label-default tips" style="cursor: pointer;" data-title="查看父级内容"  data="<!--{response.list.data[i].user_comment_parent_value}-->">父级</span>
          	<!--else-->
          	<span style="color: #999;">无父级</span>
          	<!--/if-->
          </td>
          
          <td>
          	<a href="#/user/comment/?search=%257B%2522user_comment_id%2522%253A%2522<!--{response.list.data[i].user_comment_root_id}-->%2522%257D" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>顶级</a>
          	<a href="#/user/comment/?search=%257B%2522user_comment_root_id%2522%253A%2522<!--{response.list.data[i].user_comment_id}-->%2522%257D" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>子级</a>
	    	<a href="#/user/comment/?search=%257B%2522user_comment_id%2522%253A%2522<!--{response.list.data[i].user_comment_parent_id}-->%2522%257D" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>父级</a>
	    	<a href="#/user/comment/?search=%257B%2522user_comment_parent_id%2522%253A%2522<!--{response.list.data[i].user_comment_id}-->%2522%257D" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>回复</a>
          </td>
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="12" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
    
    
    
    <!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<!--/if-->
	
	
</script>




<script id="search" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
		    <label>用户ID：</label>
		    <input type="text" class="form-control" search placeholder="输入要搜索的用户ID" name="user_id" value="<!--{search.user_id}-->">
		</div>
		<div class="form-group">
		    <label>用户昵称：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户昵称" name="user_nickname" value="<!--{search.user_nickname}-->">
		</div>
		<div class="form-group">
		    <label>用户手机号：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户手机号" name="user_phone" value="<!--{search.user_phone}-->">
		</div>
		
		<div class="form-group">
		    <label>评论ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的评论ID" name="user_comment_id" value="<!--{search.user_comment_id}-->">
		</div>
		<div class="form-group">
		    <label>评论顶级ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的评论顶级ID" name="user_comment_root_id" value="<!--{search.user_comment_root_id}-->">
		</div>
		<div class="form-group">
		    <label>评论父级ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的评论父级ID" name="user_comment_parent_id" value="<!--{search.user_comment_parent_id}-->">
		</div>
		<div class="form-group">
	    	<label>评论模块：</label>
		  	<select class="form-control" name="user_comment_module">
			  <option value="">-请选择模块-</option>
			  <!--if{response.comment_module_option}-->
			  <!--for{var i in response.comment_module_option}-->
			  <option value="<!--{i}-->" <!--if{search.type_module == i}-->selected="selected"<!--/if--> ><!--{response.comment_module_option[i]}--></option>
			  <!--/for-->
			  <!--/if-->
			</select>
	  	</div>
		<br/>
		<div class="btn-group" style="width: 100%;">
			<button type="button" class="btn btn-primary" style="width: 50%;" name="search-submit">确定筛选</button>
			<button type="button" class="btn btn-default" style="width: 50%;" name="search-clear">清理筛选</button>
		</div>
	</div>
</script>



